#ifndef __DEVICEINFOBLL_H__
#define __DEVICEINFOBLL_H__

#include "DeviceInfo.h"
#include "version.h"

void InitDeviceInfo(void);

void GetDeviceSoftwareInfo(SoftwareVersion *soft_vers);

void GetDeviceHardwareInfo(HardwareVersion *hard_vers);

void SetDeviceModelName(uint8_t *model_name, uint8_t length, bool needsave);

uint8_t GetDeviceModelName(uint8_t *model_name);

void SetDeviceUpdateTime(uint8_t *update_time, bool needsave);

void GetDeviceUpdateTime(uint8_t *update_time);

void SetDeviceUpdateFlag(bool update, bool needsave);

bool GetDeviceUpdateFlag(void);

void SetDeviceTryStartTimes(uint8_t times, bool needsave);

uint8_t GetDeviceTryStartTimes(void);

bool IsFirstStartup(void);

void SetFirtStartup(bool first_startup, bool needsave);

void SetFirmwareInfo(uint32_t size, uint16_t crc, bool needsave);

uint16_t GetSystemModelNum(void);
void SetSystemModelNum(uint16_t mID);

void GetFirmwareInfo(uint32_t *size, uint16_t *crc);

bool GetUpdateFlag(void);
#endif
